package com.pb.infra.taskManage.controller;

import com.pb.infra.oth.entity.common.Result;
import com.pb.infra.taskManage.dto.TaskLogDTO;
import com.pb.infra.taskManage.service.TaskLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("v1/taskManage/taskLog")
public class TaskLogController {

    @Resource
    private TaskLogService taskLogService;

    /**
     * 获取文件数据
     * @param dto 查询参数对象
     * @return
     */
    @PostMapping("/fileData")
    public Result fileData(@RequestBody TaskLogDTO dto) {
        return taskLogService.fileData(dto);
    }

    /**
     * 获取文件数据
     * @param dto 查询参数对象
     * @return
     */
    @PostMapping("/fileTextData")
    public Result fileTextData(@RequestBody TaskLogDTO dto) {
        return taskLogService.fileTextData(dto);
    }

}
